import React from 'react';
import "./public.css";
import "./ClassifyMusic.css";
import $ from 'jquery';
class Recomment extends React.Component {
  constructor(props){
      super(props);
      this.state={
          lists:[]
      }
  }
  render() {
    const Listview=this.state.lists.map((list,index)=>{
        return <li>
                  <div>
                      <img src={list.pic_big} alt=""/>
                      <i></i>
                  </div>
                  <p><a href="">{list.title}</a></p>
                  <p><a href="">{list.author}</a></p>
                  <p>{list.publishtime}</p>
               </li> 
    })
    return(
        <div> 
            <ul className="between" id="del_list">
                {Listview}
            </ul>
        </div>
    )
  }
  componentDidMount(){
      var that=this;
      $.ajax({
          type:"GET",
          url:'http://tingapi.ting.baidu.com/v1/restserver/ting?format=json&calback=&from=webapp_music&method=baidu.ting.billboard.billList&type=25&size=30&offset=0',
          dataType:"jsonp",
          success:function(data){
              var arr=data.song_list;
              that.setState({
                  lists:arr
              })
          }
    })
  }
}
module.exports = Recomment;
